<template>
  <view class="search-view-container" :style="{'background-color':bgc}">
    <view class="searchItem" :style="{'border-radius':radius+'px'}" @click="$emit('click')">
      <!-- 模拟的图标 -->
      <uni-icons type="search" size="16"></uni-icons>
      <!-- 模拟的文字 -->
      <text class="searchText">搜索</text>
    </view>
  </view>
</template>

<script>
  export default {
    data() {
      return {

      };
    },
    methods: {},
    props: {
      bgc: {
        type: String,
        default: "#C00000"
      },
      radius: {
        type: Number,
        // 单位是 px
        default: 18
      }
    }
  }
</script>

<style lang="scss">
  // 头部的模拟搜索框的样式
  .search-view-container {
    height: 50px;
    // background-color: #C00000;
    display: flex;
    align-items: center;
    padding: 0px 10px;

    .searchItem {
      display: flex;
      justify-content: center;
      align-items: center;
      height: 36px;
      width: 100%;
      background-color: white;
      // border-radius: 18px;

      .searchText {
        font-size: 15px;
        margin-left: 5px;
      }
    }
  }
</style>
